package com.bwie.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.FieldType;
import org.dromara.easyes.annotation.rely.IdType;

import java.math.BigDecimal;
import java.util.Date;

@Data
@IndexName("index_goods")
public class GoodsPoEs {
    /** id **/
    @IndexId( type = IdType.CUSTOMIZE)
    private Integer goodsId;
    private Integer pageNum;
    private Integer pageSize;
    /** 商家名称 **/
    @IndexField(fieldType = FieldType.TEXT,analyzer = "ik_max_word")
    private String goodsName;
    /** 价格 **/
    @IndexField(fieldType = FieldType.KEYWORD)
    private BigDecimal goodsPrice;
    @IndexField(fieldType = FieldType.KEYWORD)
    private BigDecimal sumGoodsPrice;
    /** 描述 **/
    @IndexField(fieldType = FieldType.KEYWORD)
    private String goodsMsg;
    @IndexField(fieldType = FieldType.KEYWORD)
    /** 商家 **/
    private Integer userId;
    /** 商品库存 **/
    @IndexField(fieldType = FieldType.KEYWORD)
    private Integer goodsNum;
    /** 类型 **/
    @IndexField(fieldType = FieldType.KEYWORD)
    private String goodsType;
    /** 状态 **/
    @IndexField(fieldType = FieldType.KEYWORD)
    private String goodsStatus;
    /** 商品修改时间 **/
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;
    /** 商品创建时间 **/
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;


}
